package com.obtk.byproperty.controller;

import com.obtk.byproperty.pojo.ChargeDetail;
import com.obtk.byproperty.pojo.ChargeItem;
import com.obtk.byproperty.service.ChargeItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/chargetItem")
public class ChargeItemController {

    @Autowired
    private ChargeItemService chargeItemService;

    @RequestMapping("/getCharge")
    public List<ChargeItem> getCharge(String status,String contractor,String name){
       List<ChargeItem> chargeItemList= chargeItemService.getCharge(status,contractor,name);
        System.out.println(chargeItemList);
       return chargeItemList;
    }
    @RequestMapping("/search")
    public List<ChargeItem> search(String contractor,String name,String status){
        List<ChargeItem> chargeItema=  chargeItemService.search(contractor,name,status);
        return chargeItema;
    }

}
